﻿using System.EnterpriseServices.Internal;
using System.Web.Routing;

namespace System.Web.Mvc
{
    public class UrlConst
    {
        public static UrlHelper Url { get; set; } = null;

        public static void SetRequestContext(RequestContext request) => Url = new UrlHelper(request);

        public static string SITE_HOME => Url.Action("Index", "Home", new { area = string.Empty });

        /// <summary>
        /// 登录URL地址
        /// </summary>
        public static string USER_LOGIN => Url.Action("Login", "User", new { area = "Users" });

        public static string USER_REGISTER => Url.Action("Register", "User", new { area = "Users" });

        public static string USER_LOGINOUT => Url.Action("LoginOut", "User", new { area = "Users" });

        public static string USRE_PERMISSIONTREE =>
            Url.Action("GetPermissionTree", "Manager", new { area = "Users" });

        public static string USER_USERMANAGER => Url.Action("Index", "Manager", new { area = "Users" });

        public static string BLOG_USERARTICLES => Url.RouteUrl("UserArticles");

        public static string ADMIN_MANAGER => Url.Action("Index", "Manage", new { area = "Admin" });
    }
}